import http from '../utils/http'

// 登录接口
const apiName = '/vpi/index'

export const loginApi = {
  // 微信小程序登录
  login(code) {
    return http.post(`${apiName}/login`, code)
  },
  
  // 获取用户信息
  getUserInfo() {
    return http.get(`${apiName}/userInfo`)
  },
  
  // 退出登录
  logout() {
    return http.post(`${apiName}/logout`)
  }
}

export default loginApi
